//
//  HCPhotoCameraCell.m
//  ChatForHot
//
//  Created by wr on 2018/10/15.
//  Copyright © 2018年 FLY. All rights reserved.
//

#import "HCPhotoCameraCell.h"

@implementation HCPhotoCameraCell

- (instancetype)initWithFrame:(CGRect)frame {
    if (self = [super initWithFrame:frame]) {
        [self HOTCHATdidInitialized];
    }
    return self;
}

- (void)HOTCHATdidInitialized {
    self.layer.cornerRadius = 2;
    self.clipsToBounds = YES;
    self.backgroundColor = [UIColor colorFromHexString:@"EDEDED"];
    self.selectedBackgroundView = [[UIView alloc] init];
    self.selectedBackgroundView.backgroundColor = [UIColor colorFromHexString:@"D9D9D9"];
    
    [self.contentView addSubview:self.HOTCHATbackview];
    [self.contentView addSubview:self.HOTCHATcameraImgView];
    [self.contentView addSubview:self.HOTCHATnameLab];
    
    [self.HOTCHATbackview mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self.HOTCHATcameraImgView);
        make.bottom.equalTo(self.HOTCHATnameLab);
        make.center.equalTo(self);
    }];
    
    [self.HOTCHATcameraImgView mas_updateConstraints:^(MASConstraintMaker *make) {
        make.top.left.equalTo(self.HOTCHATbackview);
    }];
    [self.HOTCHATnameLab mas_updateConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.HOTCHATbackview);
        make.bottom.equalTo(self.HOTCHATbackview);
        make.top.equalTo(self.HOTCHATcameraImgView.mas_bottom).offset(10);
    }];
}

- (UIImageView *)HOTCHATcameraImgView{
    if (_HOTCHATcameraImgView == nil) {
        _HOTCHATcameraImgView = [[UIImageView alloc] init];
        _HOTCHATcameraImgView.image = [UIImage imageNamed:@"photo_camera"];
    }
    return _HOTCHATcameraImgView;
}
- (UILabel *)HOTCHATnameLab{
    if (_HOTCHATnameLab == nil) {
        _HOTCHATnameLab = [[UILabel alloc] init];
        _HOTCHATnameLab.textColor = [UIColor colorFromHexString:@"808080"];
        _HOTCHATnameLab.font = [UIFont systemFontOfSize:10];
        _HOTCHATnameLab.text = NSLocalizedString(@"userPhoto3", nil);
    }
    return _HOTCHATnameLab;
}
- (UIView *)HOTCHATbackview{
    if (_HOTCHATbackview == nil) {
        _HOTCHATbackview = [[UIView alloc] init];
    }
    return _HOTCHATbackview;
}
@end
